package com.example.pikachu.order.controller;

import com.example.pikachu.order.entity.OrderEntity;
import com.example.pikachu.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @RequestMapping
    private void add(OrderEntity order){
        orderService.save(order);
    }

    @RequestMapping
    private void queryList(OrderEntity order){
        orderService.lambdaQuery().list();
    }
}
